package com.iracing.telemetry.controllerimpl;

import java.util.Map;

import org.apache.log4j.Logger;

import com.iracing.telemetry.controller.AbstractController;
import com.iracing.telemetry.dummy.TelemetryDummy;
import com.iracing.telemetry.servlet.TelemetryServlet;

public class LapSelectionController extends AbstractController<String> {


	/**
	 * Logger de la clase
	 */
	private static Logger log = Logger.getLogger(TelemetryServlet.class
			.getName());


	@Override
	public String execute() {


		log.info("Ejecutando controlador " + this.getClass().getName() + "...");



		//Extraer de la request el parametro y la vuelta;

		Map m = request.getParameterMap();


		String param = ((String[]) request.getParameterMap().get("SelectedTelemetryParam"))[0];
		String lap = ((String[]) request.getParameterMap().get("SelectedLapParam"))[0];


		return TelemetryDummy.getParameterValuesByLap(param, lap, request.getSession());


	}


}
